<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

/**
 * App\Models\System
 *
 * @property int $id
 * @property string $name 公司名称
 * @property string $image 公司logo
 * @property string $copyright 公司版权
 * @property \Carbon\Carbon|null $created_at
 * @property \Carbon\Carbon|null $updated_at
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\System whereCopyright($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\System whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\System whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\System whereImage($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\System whereName($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\System whereUpdatedAt($value)
 * @mixin \Eloquent
 */
class System extends Model
{
    protected $guarded=[];

    public function updateData($id, $data)
    {
        $result = $this->where('id',$id)->update($data);
        if ($result) {
            return true;
        }else{
            return false;
        }
    }
}
